package com.atguigu;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @RestController相当于@ResponseBody+@Controller
 */
@RestController
@RequestMapping("/example")
@EnableAutoConfiguration
/**
 * Enable开启Auto自动Configuration配置
 * SpringBoot配置好了web.xml,applicationContext.xml,spring.xml配置文件
 */
public class Example {
    @RequestMapping("/name")
    public String stgStudentName(){
        return "张三";
    }

    public static void main(String[] args) {
        SpringApplication.run(Example.class,args);
    }
}
